package com.example.everying.model.entity.pay;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @program: everything
 * @description: 支付渠道表
 * @author: szy
 * @create: 2025-05-14 16:45
 **/
@Data
@TableName("payment_channel")
public class PaymentChannelEntity implements Serializable {

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "主键ID")
    private Integer id;

    @NotBlank(message = "渠道编码不能为空")
    @ApiModelProperty(value = "渠道编码(WECHAT,ALIPAY)")
    private String channelCode;

    @NotBlank(message = "渠道名称不能为空")
    @ApiModelProperty(value = "渠道名称")
    private String channelName;

    @NotNull(message = "状态不能为空")
    @ApiModelProperty(value = "状态(0禁用,1启用)")
    private Integer status;

    @ApiModelProperty(value = "渠道配置(JSON格式)")
    private String config;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
}
